package cn.gzqy.zhecai.pojo;

import java.io.Serializable;
import java.util.Date;
//用户类 与数据库中的用户表(t_sys_user)对应

public class SysUser implements Serializable {
    private Integer id;   //主键ID
    private String account; //账号
    private String password; //密码
    private String realName; //真实姓名
    private Integer sex; //性别
    private Date birthday;  //生日
    private String phone; //电话
    private String address; //地址
    private Integer roleId; //角色ID
    private Integer createdUserId;  //创建人
    private  Date createdTime; //创建时间
    private Integer updatedUserId;  //修改人
    private Date updatedTime; //修改时间
    //private int age;  //年龄
    private String userRoleName;

    public SysUser(Integer id, String account, String password, String realName, Integer sex, Date birthday,
            String phone, String address, Integer roleId, Integer createdUserId, Date createdTime, Integer updatedUserId,
            Date updatedTime, String userRoleName) {
        this.id = id;
        this.account = account;
        this.password = password;
        this.realName = realName;
        this.sex = sex;
        this.birthday = birthday;
        this.phone = phone;
        this.address = address;
        this.roleId = roleId;
        this.createdUserId = createdUserId;
        this.createdTime = createdTime;
        this.updatedUserId = updatedUserId;
        this.updatedTime = updatedTime;
        this.userRoleName = userRoleName;
    }

    public SysUser() {
    }

    public SysUser(String account, String password, String realName, Integer sex, Date birthday, String phone,
            String address, Integer roleId, Integer createdUserId, Date createdTime) {
        this.account = account;
        this.password = password;
        this.realName = realName;
        this.sex = sex;
        this.birthday = birthday;
        this.phone = phone;
        this.address = address;
        this.roleId = roleId;
        this.createdUserId = createdUserId;
        this.createdTime = createdTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getCreatedUserId() {
        return createdUserId;
    }

    public void setCreatedUserId(Integer createdUserId) {
        this.createdUserId = createdUserId;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Integer getUpdatedUserId() {
        return updatedUserId;
    }

    public void setUpdatedUserId(Integer updatedUserId) {
        this.updatedUserId = updatedUserId;
    }

    public Date getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }
    // public Integer getAge() {
	// 	/*long time = System.currentTimeMillis()-birthday.getTime();
	// 	Integer age = Long.valueOf(time/365/24/60/60/1000).IntegerValue();*/
    //     // Calendar.get(Calendar.YEAR) - 1900
    //     Date date = new Date();
    //     Integer age = date.getYear()-birthday.getYear();
    //     return age;
    // }

    public String getUserRoleName() {
        return userRoleName;
    }

    public void setUserRoleName(String userRoleName) {
        this.userRoleName = userRoleName;
    }
}
